<template>
  <micro-app
      v-if="isShowPage"
      class="micro-app"
      name="form-design"
      :url="(defaultConfig as any).formDesign"
      baseroute="/form-design"
      router-mode="native"
      :data="{ token:getToken()}"
      @error="onError"
  />
  <ErrorPage v-else :code="500"></ErrorPage>
</template>

<script setup lang="ts">
import {ref} from "vue";
import defaultConfig from "@/config/setting.json";
import {getToken} from "@/utils/auth";
import ErrorPage from "@/views/error/components/ErrorPage.vue";

const isShowPage = ref(true);
const onError = ()=>{
  isShowPage.value = false;
}
</script>

<style scoped lang="scss">
.micro-app,
:deep(micro-app-body){
  height:calc(100% - 40px);
  overflow-y: auto;
}
</style>
